<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="../css/xiTongGuanLi/xtgl_roleManagement.css">
    <link rel="stylesheet" href="../font/iconfont/font_wfwf1mhqz7/iconfont.ttf">
    <link rel="stylesheet" href="../font/iconfont/font_wfwf1mhqz7/iconfont.css">
    <link rel="stylesheet" href="../libs/bootstrap-3.4.1-dist/css/bootstrap.min.css">
    <script src="./libs/bootstrap-3.4.1-dist/js/bootstrap.min.js"></script>
    <script src="../js/jquery-3.1.1.js"></script>
    <script src="../js/allData.js"></script>
    <script src="../js/utils.js"></script>

    <title>系统管理-角色管理</title>
</head>

<body>
    <div id="mainDiv">
        <div>
            <div><span>角色管理</span></div>
            <div><button>添加角色</button></div>
            <div class="clear">
                <div>
                    <span>账号</span>
                    <input type="text" placeholder="账号或姓名">
                </div>
                <div>
                    <span>角色</span>
                    <select name="" id="">
                        <option value="">全部</option>
                        <option value="">系统管理员</option>
                        <option value="">维修部主管</option>
                        <option value="">器材库管</option>
                    </select>
                </div>
                <div>
                    <span>状态</span>
                    <select name="" id="">
                        <option value="">全部</option>
                        <option value="">启用</option>
                        <option value="">禁用</option>
                    </select>
                </div>
                <div>
                    <button><span class="iconfont icon-zhongzhi">重置</span> </button>
                    <button><span class="iconfont icon-chaxun">查询</span> </button>
                </div>
            </div>
        </div>
        <table id="myTable">
            <thead>
                <tr>
                    <th>角色名称</th>
                    <th>描述</th>
                    <th>人员数</th>
                    <th>添加时间</th>
                    <th>启用/禁用</th>
                    <th>操作</th>
                </tr>
            </thead>
            <tbody>
            </tbody>
        </table>
        <div class="myPage"></div>
    </div>
    <script>
        // 1.先在login界面中把需要的数据存储至本地存储
        // 2.从本地存储中获取数据
        let arrGetData = getData('arrRole')
        // 一页装多少条数据
        let dat_num = 10;
        // 起始页
        let qishi;
        // 装最大页码
        var maxPage = getMaxPage(arrGetData, dat_num);
        // 用来装每一页显示的数据
        let arr = [];
        // 用来装当前页的页码
        let dangqianye_6;


        // 渲染页码
        showPage_6(maxPage)
        // 根据页码来渲染表格
        showTable_6(1)

        // 由本地数据转换成的JSON数据算出最大页码(一页10条数据)
        // let maxPage = getMaxPage(jszl_dataManagement, 10)
        // console.log(maxPage + '页');


    </script>
</body>

</html>